const { bot } = require("../index")


/** 点赞 */
async function ThumbUp (msg, qq, count = 10) {
  let isSuccess = await bot.pickFriend(qq).thumbUp(count)
  if (!bot.getFriendList().has(qq)) {
    await msg.reply("请先加好友再点赞", true)
    return true
  }
  if (isSuccess) {
    msg.reply(`@${msg.sender.nickname}\t已赞${count}次`, true)
    console.log(isSuccess)
  }
  else {
    msg.reply('今日已经赞过了,请明天再来哦~', true)
  }
  return true
}
exports.dianzan = ThumbUp